package com.vegetable.modules.entity.outbound;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.vegetable.common.base.BaseEntity;
import com.vegetable.modules.entity.baseData.ProductSpec;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 销售订货商品表
 * </p>
 *
 * @author wangruijie
 * @since 2024-03-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="SalesOrderDetail对象", description="销售订货商品表")
public class SalesOrderDetail  extends BaseEntity {

    @ApiModelProperty(value = "生产者ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long producerId;

    @ApiModelProperty(value = "销售单ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long salesId;

    @ApiModelProperty(value = "订单编号")
    @TableField(exist = false)
    private String docNo;

    @ApiModelProperty(value = "商品ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long commodityId;

    @ApiModelProperty(value = "商品编码")
    private String commodityCode;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "规格ID")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long specsId;

    @ApiModelProperty(value = "规格名称")
    private String specsName;

    @ApiModelProperty(value = "标准")
    private BigDecimal standard;

    @ApiModelProperty(value = "数量")
    private Integer number;

    @ApiModelProperty(value = "重量")
    private BigDecimal weight;

    @ApiModelProperty(value = "初始数量")
    private Integer startNumber;

    @ApiModelProperty(value = "初始重量")
    private BigDecimal startWeight;

    @ApiModelProperty(value = "补充数量")
    private Integer inNumber;

    @ApiModelProperty(value = "补充重量")
    private BigDecimal inWeight;

    @ApiModelProperty(value = "走货数量")
    private Integer shiftNumber;

    @ApiModelProperty(value = "走货重量")
    private BigDecimal shiftWeight;

    @ApiModelProperty(value = "描述")
    private String remark;

    @ApiModelProperty(value = "扣除库存")
    @TableField(exist = false)
    private List<SalesOrderDetailStock> stocks;

    @ApiModelProperty(value = "库存数量")
    @TableField(exist = false)
    private Integer stockNumber;

    @ApiModelProperty(value = "库存重量")
    @TableField(exist = false)
    private BigDecimal stockWeight;

    @ApiModelProperty(value = "体积")
    private BigDecimal volume;

    @ApiModelProperty(value = "毛重")
    private BigDecimal grossWeight;

    @ApiModelProperty(value = "客户名称")
    @TableField(exist = false)
    private String customerName;


    @ApiModelProperty(value = "品类")
    private String category;

    @ApiModelProperty(value = "规格列表")
    @TableField(exist = false)
    private List<ProductSpec> specList;

    @TableField(exist = false)
    private Date orderTime;

}
